<?php 
	require_once (dirname(__FILE__).'/includes/tpl_config.php');
	require_once (dirname(__FILE__).'/includes/dbconn.php');
	
	$tpl->assign("title","IBM俱乐部表格填写");
	require_once 'navi.php';

	$formid=$_GET['fid'];	
	$selname = "select formtitle from form where fid=$formid";
	$selresult = $db->sql_query($selname);	
    $fname = $db->sql_fetchrow($selresult);
    $db->sql_freeresult($selresult);
    $tpl->assign("formname",$fname['formtitle']);    
	
    $formname="form".$formid;
    $sql = "select item,itemtype,allownull from $formname";
    $result = $db->sql_query($sql);
    $rowset = $db->sql_fetchrowset($result);
	$db->sql_freeresult($result);
	$tpl->assign("formrows",$rowset);   //将结果集回显导航栏
	
	$tpl->display('form.tpl');
	$tpl->display('footer.tpl');
?>